package xyz.thoughtset.viewer.executor.blocks.constants;

import com.google.common.collect.ImmutableMap;

import java.util.Date;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;

public class TypeConstants {
    public static final Map<String,Class> TYPE_MAP = new ImmutableMap.Builder<String,Class>()
            .put("String", String.class)
            .put("Boolean", Boolean.class)
            .put("byte", Byte.class)
            .put("Double", Double.class)
            .put("Integer", Integer.class)
            .put("Long", Long.class)
            .put("Date", Date.class)
            .build();

    public static final List BASE_TYPE_LIST = TYPE_MAP.entrySet().stream()
            .map( e -> {
                HashMap map = new HashMap();
                map.put("title",e.getKey());
                map.put("value",e.getKey());
                return map;
            }).collect(Collectors.toList());
}
